﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using FBEntities.FBObjects;
using FBEntities.FBObjects.User;
using Newtonsoft.Json.Linq;
using System.IO;

namespace FBEntities.FBConnections.User
{
    public class FBHome : FBConnection
    {
        public List<FBPost> data;

        public FBHome()
        {
            type = "home";
            data = new List<FBPost>();
        }
    }

    public class FBFeed : FBConnection
    {
        public List<FBPost> data;

        public FBFeed()
        {
            type = "feed";
            data = new List<FBPost>();
        }
    }

    public class FBTagged : FBConnection
    {
        public List<FBPost> data;

        public FBTagged()
        {
            type = "tagged";
            data = new List<FBPost>();
        }
    }

    public class FBPosts : FBConnection
    {
        public List<FBPost> data;

        public FBPosts()
        {
            type = "posts";
            data = new List<FBPost>();
        }
    }

    public class FBPicture
    {
        public string url;

        public FBPicture(string id)
        {
            url = "https://graph.facebook.com/" + id + "/picture?" + FBParseUtilities.authKey;
        }
    }

    public class FBFriends : FBConnection
    {
        public List<FBProxyPerson> data;

        public FBFriends()
        {
            type = "friends";
            data = new List<FBProxyPerson>();
        }
    }

    public class FBActivities : FBConnection
    {
        public List<FBInterest> data;

        public FBActivities()
        {
            type = "activities";
            data = new List<FBInterest>();
        }

        public override string ToString()
        {
            string list = "";

            foreach (var i in data)
            {
                if (string.IsNullOrEmpty(list))
                    list = i.name;
                else
                    list += ", " + i.name;
            }
            return list;
        }
    }

    public class FBInterests : FBConnection
    {
        public List<FBInterest> data;

        public FBInterests()
        {
            type = "interests";
            data = new List<FBInterest>();
        }

        public override string ToString()
        {
            string list = "";

            foreach (var i in data)
            {
                if (string.IsNullOrEmpty(list))
                    list = i.name;
                else
                    list += ", " + i.name;
            }
            return list;
        }
    }

    public class FBMusic : FBConnection
    {
        public List<FBInterest> data;

        public FBMusic()
        {
            type = "music";
            data = new List<FBInterest>();
        }

        public override string ToString()
        {
            string list = "";

            foreach (var i in data)
            {
                if (string.IsNullOrEmpty(list))
                    list = i.name;
                else
                    list += ", " + i.name;
            }
            return list;
        }
    }

    public class FBBooks : FBConnection
    {
        public List<FBInterest> data;

        public FBBooks()
        {
            type = "books";
            data = new List<FBInterest>();
        }

        public override string ToString()
        {
            string list = "";

            foreach (var i in data)
            {
                if (string.IsNullOrEmpty(list))
                    list = i.name;
                else
                    list += ", " + i.name;
            }
            return list;
        }
    }

    public class FBMovies : FBConnection
    {
        public List<FBInterest> data;

        public FBMovies()
        {
            type = "movies";
            data = new List<FBInterest>();
        }

        public override string ToString()
        {
            string list = "";

            foreach (var i in data)
            {
                if (string.IsNullOrEmpty(list))
                    list = i.name;
                else
                    list += ", " + i.name;
            }
            return list;
        }
    }

    public class FBTelevision : FBConnection
    {
        public List<FBInterest> data;

        public FBTelevision()
        {
            type = "television";
            data = new List<FBInterest>();
        }

        public override string ToString()
        {
            string list = "";

            foreach (var i in data)
            {
                if (string.IsNullOrEmpty(list))
                    list = i.name;
                else
                    list += ", " + i.name;
            }
            return list;
        }
    }

    public class FBLikes : FBConnection
    {
        public List<FBInterest> data;

        public FBLikes()
        {
            type = "likes";
            data = new List<FBInterest>();
        }
    }

    public class FBLinks : FBConnection
    {
        public List<FBPost> data;

        public FBLinks()
        {
            type = "links";
            data = new List<FBPost>();
        }
    }

    public class FBPhotos : FBConnection
    {
        public List<FBPhoto> data;

        public FBPhotos()
        {
            type = "photos";
            data = new List<FBPhoto>();
        }
    }

    public class FBAlbums : FBConnection
    {
        public List<FBAlbum> data;

        public FBAlbums()
        {
            type = "albums";
            data = new List<FBAlbum>();
        }
    }

    public class FBNotes : FBConnection
    {
        public List<FBNote> data;

        public FBNotes()
        {
            type = "notes";
            data = new List<FBNote>();
        }
    }

    public class FBEvents : FBConnection
    {
        public List<FBEvent> data;

        public FBEvents()
        {
            type = "events";
            data = new List<FBEvent>();
        }
    }

    public class FBStatuses : FBConnection
    {
        public List<FBStatus> data;

        public FBStatuses()
        {
            type = "statuses";
            data = new List<FBStatus>();
        }
    }

    public class FBInbox : FBConnection
    {
        public List<FBMail> data;

        public FBInbox()
        {
            type = "inbox";
            data = new List<FBMail>();
        }
    }
}
